<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
    <style>
        #pageHeight{
          height:1300px
        }
        #imgs,#imgss{
            width:200px;
            height:300px;
        }
        #imgss {
            width:200px;
            height:200px
        }
        #webCenter {
            font-size:30px;
            text-align:center
        }
        div{
            text-align:center
        }
        #fileAccess2 {
            display:block;
            width: 300px;
            height: 150px;
            line-height: 150px;
            text-align: center;
            background-color: orange;
            position: absolute;
            top: 20%;
            left: 40%;
            margin-left: -100px;
            margin-top: -75px;
            font-size：80px
         }
    </style>
</head>
<body>
<div id="container">首页323 <a href="second.html" id="fileAccess">打开rawfile文件</a></div>
<img src="../base/media/icon.jpg" alt="icon" id="fileAccess2">
<div><img src="http://example.com/image.jpg" alt="icon" id="img"></div>
<div> <input type="file" value="file" id="file" /></div>
<div id="webCenter">CENTER TEXT<input type="text"/></div>
</body>
<script>
    let ele=document.getElementById("img");
        let loadImage;
        ele.onload=function(){
            loadImage="load complete"
        }
        function clickFile() {
            document.getElementById("file").click()
            return "file"
        }
        function clickA(){
            document.getElementById("fileAccess").click()
        }
        function clickB(){
            document.getElementById("img").click()
        }
        function getMessageLevel() {
               console.debug('This is a warning message.1')
               console.info('This is a warning message.2')
               console.warn('This is a warning message.3')
               console.error('This is a warning message.4')
               console.log('This is a warning message.5')
               return "index.html"
        }
        function getMessageLevelDebug() {
               console.debug('This is a warning message.1')
               return "1"
        }
        function getMessageLevelInfo() {
               console.info('This is a warning message.1')
        }
        function getMessageLevelWarn() {
               console.warn('This is a warning message.1')
               return "3"
        }
        function getMessageLevelError() {
               console.error('This is a warning message.1')
               return "4"
        }
        function getMessageLevelLog() {
               console.log('This is a warning message.1')
               return "5"
        }
        function getFontFamily(){
            var bodyStyle = window.getComputedStyle(document.body);
            var fontFamily = bodyStyle.getPropertyValue("font-family");
            return fontFamily
        }

        function getBodySerifFontValue() {
          const bodyElement = document.querySelector('body');
          if (bodyElement) {
            const computedStyle = window.getComputedStyle(bodyElement);
            const fontFamily = computedStyle.getPropertyValue('font-family');
            if (fontFamily.includes('serif')) {
              return fontFamily;
            }
          }
          return null;
        }
        function getSerifFont() {
        const bodySerifFontValue = getBodySerifFontValue();
        if (bodySerifFontValue) {
          return bodySerifFontValue
        } else {
          return 'none'
        }
        }
        function getSansSerifFont(){
            return '503fun'
        }
        function getWebFixedFont(){
            return '504fun'
        }
        function getWebFantasyFont(){
            return '505fun'
        }
        function getWebCursiveFont(){
            return '506fun'
        }
        function getUserAgent(){
            return navigator.userAgent
        }
        function test(){
            backToEts.test("backToEts")
        }
        function testRunJavaScript(){
            return "testRunJavaScript"
        }
        function getPageHeight(){
            let height=document.body.scrollHeight
            return height
        }
        function proxy(){
            objName.register("backToEts")
        }
        function registerTest(){
            let str=objName.register();
            console.log(str);
            return str
        }
        function jsAccess(){
            console.log("web111")
        }
        function consoleTest(){
            console.log("console test")
        }
        function alertTest(){
            alert('alert test')
        }
        function confirmTest(){
            confirm("confirm test")
        }
        function getImgResult(){
            return loadImage
        }
        function toPrompt(){
            let result=prompt("age","20");
            console.log("result:"+result)
        }
        function openRawFile(){
            document.getElementById("fileAccess").click()
        }
        function getTitle(){
            return document.title
        }
</script>
</html>